Component({
  /**
   * 组件的属性列表
   */
  properties: {
    info: Object
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    onNavToGoodsDetails () {
      const { platform_type, goods_id, mall_id } = this.data.info
      // 1:拼多多 2:淘宝 3:京东 4,自营
      switch (platform_type) {
        case 1:
        case 2:
        case 3:
          wx.navigateTo({
            url: `/pages/goods/detail/detail?id=${goods_id}`
          });
          break;
        case 4:
          wx.navigateTo({
            url: `/pages/goods/mmallGoodsDetails/mmallGoodsDetails?id=${goods_id}&storeId=${mall_id}`
          });
          break;
        default:
          break;
      }
    },
    onNavToStore () {
      const { platform_type, mall_id } = this.data.info
      // 1:拼多多 2:淘宝 3:京东 4,自营
      switch (platform_type) {
        case 1:
        case 2:
        case 3:
          break;
        case 4:
          wx.navigateTo({
            url: `/pages/store/index/store?id=${mall_id}`
          });
          break;
        default:
          break;
      }
    }
  }
})
